package service;

import model.User;
import org.junit.Test;


public class UserResigter {

    //    @Test
//    public void test(){
//        User user = new User(9,"9");
//        System.out.println(resigter(user));
//    }
    public int resigter(User user) {
        int flag = 0;

        User user1 = new SelectOne().select(user.getId());
        System.out.println(user1);
        if (user1 != null) {
            flag = 2;
        } else {
            new JDBCResigster().resigster(user);
            flag = 1;
        }
        return flag;
    }
}
